package com.clw.practice.jol;

import org.openjdk.jol.info.ClassLayout;

public class JOLDemo {
    private static Object  o;
    public static void main(String[] args) {
        o = new Object();
        synchronized (o){
            System.out.println(ClassLayout.parseInstance(o).toPrintable());
        }
        System.out.println(ClassLayout.parseInstance(o).toPrintable());
        
//        0   8        (object header: mark)     0x0000000002a1f7f8 (thin lock: 0x0000000002a1f7f8)
//        8   4        (object header: class)    0x200001e5
        
//        0     4        (object header)                           38 f1 86 02 (00111000 11110001 10000110 00000010) (42398008)
//        4     4        (object header)                           00 00 00 00 (00000000 00000000 00000000 00000000) (0)
//        8     4        (object header)                           e5 01 00 20 (11100101 00000001 00000000 00100000) (536871397)
    }
}